Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Telephony /
Chapter 4 - Call Appearances / Call Appearance Reference
Call Appearance Functions / Detecting Voice and Silence


TELCASilenceDetect

Activates or deactivates silence detection on a call appearance.

pascal TELErr TELCASilenceDetect (
                     TELCAHandle hTELCA, 
                     Boolean DetectOn, 
                     long Period);
hTELCA
A handle you provide to the call appearance structure for the call appearance of interest. You can get the handle from the TELSetupCall function (page 4-24).
DetectOn
A Boolean value. Set this parameter to true if you want to activate silence detection for the call appearance referenced by hTELCA. Set it to false to deactivate silence detection.
Period
The duration of silence on the telephone line, in seconds, that qualifies as silence detection. You need to provide this value only when you activate silence detection (DetectOn is true).
function result
A result code. If you call TELCASilenceDetect to activate silence detection and silence detection is already active, the function returns the telDetAlreadyOn result code.
DESCRIPTION
The TELCASilenceDetect function activates or deactivates silence detection for the call appearance specified by the hTELCA parameter, according to the value of the DetectOn parameter. After you call TELCASilenceDetect to activate silence detection, the telephone tool listens for silence on the line. If the line is silent for the number of seconds specified by the Period parameter, silence is deemed to have been detected. As a result, your call appearance message handler gets a telCASilenceDetectedMsg message.

Silence detection is not a continuous process. Once silence is detected, silence detection is automatically deactivated--the tool ceases to listen for silence. You get at most only one telCASilenceDetectedMsg message each time you call TELCASilenceDetect to activate silence detection. To detect another silent period, call TELCASilenceDetect again after getting a telCASilenceDetectedMsg message.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help